<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<%@ taglib prefix="sjg" uri="/struts-jquery-grid-tags"%>

<script type="text/javascript">

  function opzioni(cellvalue, options, rowObject )
  {
    return "<a href='updateForm.action?id="+rowObject.id+"' ><img src='../images/pencil.png' alt='Modifica' title='Modifica' border='0' /></a>"+
           "<a href='updateForm.action?id="+rowObject.id+"' ><img src='../images/remove.png' alt='Cancella' title='Cancella' border='0' /></a>";
  }
  
  //-->
</script>

<s:url id="urlListProdotti" action="elencoProdotti" namespace="/admin" />
<s:url id="urlAddProdotto" action="addProdotto" namespace="/admin" />

<div class="post">
<h2 class="title"><s:text name="sidebar.prodotti"></s:text> </h2>
  <div style="clear: both;">&nbsp;</div>
  <div class="entry">
    <sjg:grid id="gridFiori"
        dataType="json"
        href="%{urlListProdotti}"
        pager="false"
        gridModel="listProdotti">
        <sjg:gridColumn name="nome" title="Nome" />
        <sjg:gridColumn name="options" title="" formatter="opzioni"/>
    </sjg:grid>
 <div style="clear: both;">&nbsp;</div>
 <s:a href="%{urlAddProdotto}" ><img src="../images/add.png"  border="0"/></s:a></div>
</div>


 
